:root {
  /* Default color scheme */
  --ao-bg-color: white;
  --ao-text-color: #111;
  --ao-border-color: #000;
  --ao-input-bg: white;
  --ao-hover-bg: #f0f0f0;
  --ao-shadow-color: rgba(0, 0, 0, 0.8);
  --ao-category-bg: #f0f0f0;
  --ao-category-text: #555;
  --ao-link-color: #4CAF50;
  
  /* Additional color variables */
  --ao-result-bg: var(--ao-bg-color);
  --ao-result-hover: var(--ao-hover-bg);
  --ao-heading-color: var(--ao-text-color);
  --ao-tag-bg: var(--ao-border-color);
  --ao-tag-text: var(--ao-bg-color);
  --ao-button-bg: var(--ao-border-color);
  --ao-button-text: var(--ao-bg-color);
  --ao-accent-color: #4fad53;
  --ao-secondary-text: #666;
  
  /* Layout variables */
  --container-padding: 32px;
  --container-border-width: 2px;
  --container-shadow: 8px 8px 0 var(--ao-shadow-color);
  --container-max-width: 750px;
  --container-width: 90%;
  --result-padding: 16px 20px;
  --term-font-size: 22px;
  --definition-font-size: 16px;
  --input-padding: 16px;
  --header-display: block;
}

/* Iframe mode variables */
.iframe-embed {
  --ao-shadow-color: transparent;
  --container-shadow: none;
  --container-border-width: 0;
  --container-padding: 16px;
  --container-max-width: 100%;
  --container-width: 100%;
  /* Don't hide header by default in iframe mode */
  /* --header-display: none; */
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--ao-bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--ao-text-color);
}

.search-container {
  max-width: var(--container-max-width);
  width: var(--container-width);
  margin: 0 auto;
  padding: var(--container-padding);
  background-color: var(--ao-bg-color);
  border-radius: 2px;
  box-shadow: var(--container-shadow);
  border: var(--container-border-width) solid var(--ao-border-color);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: none;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  z-index: 1;
}

.search-container.has-results {
  position: absolute;
  top: 0;
  transform: translate(-50%, 10%);
  transition: none;
  height: 80%;
}

h1 {
  color: var(--ao-text-color);
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 24px;
  margin-top: 0;
  letter-spacing: -0.5px;
  display: var(--header-display);
}

.search-input {
  position: relative;
  width: 100%;
}

.search-input input {
  width: 100%;
  padding: var(--input-padding);
  font-size: 18px;
  border: var(--container-border-width) solid var(--ao-border-color);
  border-radius: 0;
  margin: 0;
  box-sizing: border-box;
  transition: all 0.2s ease;
  background-color: var(--ao-input-bg);
  color: var(--ao-text-color);
}

/* Remove shadow when results are showing */
.has-results .search-input input {
  box-shadow: none !important;
  transform: none !important;
  outline: none !important;
}

.search-input input:focus:not(.has-results .search-input input) {
  outline: none;
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--ao-shadow-color);
}

#results {
  width: 100%;
  max-height: 500px;
  overflow-y: auto;
  background: var(--ao-bg-color);
  border: 2px solid var(--ao-border-color);
  border-top: none;
  box-shadow: 6px 6px 0 var(--ao-shadow-color);
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  box-sizing: border-box;
  margin-top: -2px; /* Fix the connection artifact */
  position: absolute;
  top: 100%;
  left: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Hide scrollbar for Chrome, Safari and Opera */
#results::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
#results {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

#results.has-results {
  opacity: 1;
  visibility: visible;
}

.result-item {
  padding: 16px 20px;
  border-bottom: 2px solid var(--ao-border-color);
  cursor: pointer;
  position: relative;
  background-color: var(--ao-result-bg);
}

.result-item:last-child {
  border-bottom: none;
}

/* Simplified hover state - only background change */
.result-item:hover {
  background-color: var(--ao-result-hover);
}

/* Enhanced keyboard selection state */
.result-item.selected {
  background-color: var(--ao-hover-bg);
  border-left: 4px solid var(--ao-border-color);
  padding-left: 16px;
}

/* Remove hover effect when keyboard navigation is active */
.keyboard-active .result-item:hover:not(.selected) {
  background-color: transparent;
}

/* Improved styling for no matching items */
.no-results {
  padding: 24px;
  text-align: center;
  font-weight: 600;
  font-size: 18px;
  color: var(--ao-text-color);
  background-color: var(--ao-hover-bg);
  border-bottom: none;
  cursor: default;
}

.no-results:hover {
  background-color: var(--ao-hover-bg);
}

.no-results::before {
  content: "!";
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  background-color: var(--ao-border-color);
  color: var(--ao-bg-color);
  border-radius: 50%;
  margin-right: 10px;
  font-weight: bold;
}

.term {
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 6px;
  color: var(--ao-heading-color);
}

.category {
  font-size: 14px;
  color: var(--ao-category-text);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.definition {
  color: var(--ao-text-color);
  margin-bottom: 10px;
  line-height: 1.6;
}

.aliases {
  font-style: italic;
  color: var(--ao-category-text);
  margin: 10px 0;
  font-size: 14px;
}

.related-terms {
  margin-top: 12px;
}

.related-tag {
  display: inline-block;
  background-color: var(--ao-tag-bg);
  color: var(--ao-tag-text);
  padding: 4px 10px;
  margin-right: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.docs-link {
  margin-top: 10px;
  font-size: 14px;
}

.docs-link a {
  color: var(--ao-link-color);
  text-decoration: underline;
}

#loading-status {
  text-align: center;
  padding: 20px;
  margin-top: 20px;
  color: var(--ao-text-color);
  background-color: var(--ao-hover-bg);
  border: 2px solid var(--ao-border-color);
  display: none;
}

.loader {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin: 8px auto;
  border: 3px solid var(--ao-border-color);
  border-radius: 0;
  border-top: 3px solid var(--ao-bg-color);
  animation: spin 1s linear infinite;
}

.copied-message {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--ao-border-color);
  color: var(--ao-bg-color);
  padding: 8px 14px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  animation: fadeOut 2s forwards;
  z-index: 20;
}

@media (max-width: 768px) {
  .search-container {
    margin: 0;
    border-radius: 0;
    border-width: 0;
    border-top-width: 2px;
    box-shadow: none;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    position: relative;
    top: 0;
    left: 0;
    transform: none;
  }

  .search-container.has-results {
    position: relative;
    transform: none;
    left: 0;
    margin: 0;
    min-height: auto;
  }
  
  .search-input {
    width: 100%;
  }
  
  #results {
    width: 100%;
    box-shadow: none;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeOut {
  0% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; }
}

/* iframe-specific styles */
.iframe-embed {
  height: 100%;
  overflow: auto;
  contain: content;
}

.iframe-embed body {
  height: 100%;
  overflow: auto;
  margin: 0;
  padding: 0;
  background-color: var(--ao-bg-color);
  color: var(--ao-text-color);
}

/* Hide header when hide-header parameter is used */
html.hide-header .search-container h1 {
  display: none;
}

html.hide-header .search-container {
  margin-top: 0;
  padding-top: 0;
}

html.hide-header .search-input {
  margin-top: 8px; /* Add minimal margin to see the top border */
}

/* Translucent background styles */
html.translucent-bg {
  --translucent-opacity: 0.92; /* Default opacity if not set via JS */
  --translucent-bg-color: rgba(255, 255, 255, var(--translucent-opacity));
  --translucent-border-color: rgba(0, 0, 0, calc(var(--translucent-opacity) * 0.3));
  --translucent-shadow-color: rgba(0, 0, 0, calc(var(--translucent-opacity) * 0.4));
}

/* Dark mode detection for translucent background */
@media (prefers-color-scheme: dark) {
  html.translucent-bg {
    --translucent-bg-color: rgba(30, 30, 30, var(--translucent-opacity));
    --translucent-border-color: rgba(255, 255, 255, calc(var(--translucent-opacity) * 0.3));
    --translucent-shadow-color: rgba(0, 0, 0, calc(var(--translucent-opacity) * 0.6));
  }
}

html.translucent-bg body {
  background-color: var(--translucent-bg-color);
}

html.translucent-bg .search-container {
  background-color: var(--translucent-bg-color);
  border-color: var(--translucent-border-color);
}

.iframe-embed .search-container {
  position: relative;
  top: 0;
  left: 0;
  transform: none;
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-shadow: none;
  border: none;
  transition: none;
  padding: 16px;
  height: auto;
  overflow: visible;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--ao-bg-color);
}

.iframe-embed .search-input {
  position: relative;
  flex-shrink: 0;
  margin-bottom: 0;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.iframe-embed .search-input input {
  width: 100%;
  font-size: 16px;
  height: 44px;
  border: 2px solid var(--ao-border-color);
  border-radius: 0;
  background-color: var(--ao-input-bg);
  color: var(--ao-text-color);
}

.iframe-embed #results {
  position: absolute;
  top: calc(100% - 2px); /* Overlap the 2px bottom border of the input */
  left: 0;
  right: 0;
  width: 100%;
  background: var(--ao-bg-color);
  border: 2px solid var(--ao-border-color);
  border-top: none;
  box-shadow: 6px 6px 0 var(--ao-shadow-color);
  z-index: 100;
  box-sizing: border-box;
}

.iframe-embed .result-display {
  position: relative;
  left: 0;
  opacity: 1;
  width: 100%;
  padding: 20px 40px;
  border: none;
  background-color: var(--ao-bg-color);
  box-sizing: border-box;
  display: none;
  flex-direction: column;
  gap: 8px;
  color: var(--ao-text-color);
  transition: opacity 0.2s ease;
  max-height: none;
  overflow-y: auto;
  z-index: 10;
}

.iframe-embed .result-display.active {
  position: relative;
  left: 0;
  opacity: 1;
  display: flex !important;
  scrollbar-width: none;
}

.iframe-embed .result-container {
  position: relative;
  width: 100%;
  min-height: 200px;
  padding: 0;
  box-sizing: border-box;
  display: block;
  overflow: visible;
}

/* Navigation buttons container */
.iframe-embed .nav-buttons-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding: 0 8px;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid var(--ao-border-color);
  padding-top: 12px;
}

.iframe-embed .nav-button {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  background-color: var(--ao-button-bg);
  color: var(--ao-button-text);
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: opacity 0.2s ease;
  margin-left: 8px;
}

.iframe-embed .nav-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Remove absolute positioning styles */
.iframe-embed .nav-button.prev,
.iframe-embed .nav-button.next {
  position: static;
  transform: none;
}

.iframe-embed .term {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ao-text-color);
}

.iframe-embed .category {
  display: inline-block;
  font-size: 12px;
  padding: 4px 8px;
  margin-bottom: 8px;
  background-color: var(--ao-category-bg);
  color: var(--ao-category-text);
}

.iframe-embed .definition {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  color: var(--ao-text-color);
  max-height: none;
  overflow: visible;
}

.iframe-embed .aliases {
  font-size: 12px;
  margin: 0;
  color: var(--ao-secondary-text);
  opacity: 0.9;
}


.iframe-embed .related-terms {
  margin-bottom: 12px;
  color: var(--ao-text-color);
}

.iframe-embed .related-tag {
  display: inline-block;
  font-size: 12px;
  padding: 4px 8px;
  margin-right: 4px;
  margin-bottom: 4px;
  background-color: var(--ao-category-bg);
  color: var(--ao-text-color);
  cursor: pointer;
}

.iframe-embed .docs-link {
  font-size: 14px;
  margin-top: 12px;
}

.iframe-embed .docs-link a {
  color: var(--ao-link-color);
}

.iframe-embed .result-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--ao-border-color);
}

.iframe-embed .result-count {
  font-size: 11px;
  color: var(--ao-secondary-text);
  flex-grow: 1;
}

/* Responsive adjustments */
@media (max-height: 400px) {
  .iframe-embed .search-container {
    padding: 12px;
  }
  
  .iframe-embed .search-input {
    margin-bottom: 12px;
    width: 100%;
  }
  
  .iframe-embed .search-input input {
    height: 36px;
    padding: 8px 36px 8px 12px;
  }
  
  .iframe-embed .result-display {
    padding: 12px;
  }
  
  .iframe-embed .term {
    font-size: 16px;
  }
  
  .iframe-embed .definition {
    font-size: 12px;
    line-height: 1.3;
  }
  
  .iframe-embed .related-terms,
  .iframe-embed .docs-link {
    display: none;
  }
  
  .iframe-embed .result-footer {
    padding-top: 6px;
    margin-top: 6px;
  }
  
  .iframe-embed .nav-button {
    width: 28px;
    height: 28px;
    font-size: 14px;
    margin-left: 6px;
  }
}

/* Additional media query for very small screens */
@media (max-width: 480px) {
  .iframe-embed .result-footer {
    padding-top: 6px;
  }
  
  .iframe-embed .nav-button {
    width: 28px;
    height: 28px;
    margin-left: 4px;
  }
  
  .iframe-embed .result-display {
    padding: 16px 24px;
  }
}

/* Remove float-related styles as they're not needed */
.iframe-embed .result-container::after,
.iframe-embed .result-display {
  float: none !important;
  clear: none !important;
}

.iframe-embed .result-item:hover {
  background-color: var(--ao-result-hover);
}

.iframe-embed .result-item.selected {
  background-color: var(--ao-hover-bg);
}

/* Transaction Results Styling */
.loading-tx {
  padding: 1rem;
  text-align: center;
  color: var(--ao-text-color);
  font-style: italic;
}

/* Make tx-result extend result-item */
.tx-result {
  /* Inherits most styles from result-item */
  background-color: var(--ao-result-bg, #fff);
}

/* Transaction metadata styling */
.tx-result .definition {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  position: relative;
  overflow-x: hidden;
}

/* Add dividers between columns */
.tx-meta-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
  overflow-x: hidden;
}

.tx-label {
  font-weight: bold;
  color: var(--ao-secondary-text, #666);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px dashed var(--ao-border-color, rgba(0, 0, 0, 0.1));
  padding-bottom: 0.25rem;
}

.tx-owner {
  font-family: monospace;
  font-size: 0.9rem;
  word-break: break-all;
  overflow-x: hidden;
}

/* Transaction tags styling (extends related-terms) */
.tx-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ao-border-color, rgba(0, 0, 0, 0.1));
}

.tx-tag {
  /* Inherits most styles from related-tag */
  display: inline-flex !important;
  align-items: center;
  padding: 0.25rem 0.5rem !important;
  background-color: var(--ao-tag-bg);
  color: var(--ao-tag-text);
}

.tx-tag .tag-name {
  font-weight: bold;
}

.tx-tag .tag-value {
  font-family: monospace;
  font-size: 0.85rem;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: break-word;
  margin-left: 0.25rem;
}

/* Transaction links styling (extends docs-link) */
.tx-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.tx-links a {
  color: var(--ao-link-color);
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tx-result .definition {
    grid-template-columns: 1fr;
  }
}

/* iframe-specific transaction styling */
.iframe-embed .tx-meta-item {
  padding: 0.4rem;
  margin-bottom: 0.4rem;
  border-radius: 4px;
}

.iframe-embed .tx-label {
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px dashed var(--ao-border-color, rgba(0, 0, 0, 0.1));
  padding-bottom: 0.2rem;
}

.iframe-embed .tx-tags {
  display: flex !important;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ao-border-color, rgba(0, 0, 0, 0.1));
  margin-top: 0.5rem;
  max-height: none;
  overflow: visible;
  padding-right: 0.5rem;
  width: 100%;
  position: relative;
  z-index: 5;
}

.iframe-embed .tx-tag {
  display: inline-flex !important;
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem !important;
  margin-bottom: 0.4rem;
  margin-right: 0.4rem;
  max-width: none;
  position: relative;
}

.iframe-embed .tx-tag .tag-name {
  font-weight: bold;
  margin-right: 0.25rem;
  display: inline-block;
}

.iframe-embed .tx-tag .tag-value {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
  display: inline-block;
}

/* Custom scrollbar for iframe transaction data */
.iframe-embed .result-display::-webkit-scrollbar,
.iframe-embed .tx-tags::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.iframe-embed .result-display::-webkit-scrollbar-track,
.iframe-embed .tx-tags::-webkit-scrollbar-track {
  background: var(--ao-bg-color, #f1f1f1);
}

.iframe-embed .result-display::-webkit-scrollbar-thumb,
.iframe-embed .tx-tags::-webkit-scrollbar-thumb {
  background: var(--ao-border-color, #888);
  border-radius: 3px;
}

.iframe-embed .result-display::-webkit-scrollbar-thumb:hover,
.iframe-embed .tx-tags::-webkit-scrollbar-thumb:hover {
  background: var(--ao-border-color);
}

/* Transaction iframe styling */
.tx-iframe-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 1000;
  padding: 2rem;
  box-sizing: border-box;
  overflow-y: auto;
}

.tx-iframe-header {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--ao-border-color);
  padding: 0.75rem 1rem;
  border-radius: 8px 8px 0 0;
}

.tx-iframe-header h3 {
  margin: 0;
  color: var(--ao-bg-color);
  font-size: 1.1rem;
  font-weight: 500;
}

.tx-iframe-close {
  background: none;
  border: none;
  color: var(--ao-bg-color);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.tx-iframe-close:hover {
  opacity: 0.8;
}

.tx-iframe-content {
  width: 100%;
  max-width: 900px;
  height: auto;
  min-height: 300px;
  max-height: calc(100vh - 120px);
  background-color: var(--ao-bg-color);
  border: 2px solid var(--ao-border-color);
  border-top: none;
  border-bottom: none;
  overflow-y: auto;
}

.tx-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background-color: var(--ao-bg-color);
  overflow: auto;
}

/* Add fallback for iframe content */
.tx-iframe-fallback {
  display: none;
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 1rem;
  background-color: var(--ao-bg-color);
  color: var(--ao-text-color);
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 8px 8px 0 0;
}

.tx-iframe-fallback.active {
  display: block;
}

.tx-iframe-fallback-message {
  text-align: center;
  padding: 2rem;
  color: var(--ao-text-color);
}

.tx-iframe-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px 8px 0 0;
}

.tx-iframe-content iframe.hidden {
  display: none;
}

.tx-iframe-footer {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--ao-border-color);
  padding: 0.75rem 1rem;
  border-radius: 0 0 8px 8px;
}

.tx-iframe-controls {
  display: flex;
  gap: 0.5rem;
}

.tx-iframe-raw-toggle {
  background: none;
  border: 1px solid var(--ao-bg-color);
  color: var(--ao-bg-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.tx-iframe-raw-toggle:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.tx-iframe-footer a {
  color: var(--ao-bg-color);
  text-decoration: underline;
  font-size: 0.9rem;
}

/* Transaction keyboard navigation styling */
.tx-result.selected {
  border-left: 4px solid var(--ao-border-color);
  padding-left: 16px;
  background-color: var(--ao-hover-bg);
  position: relative;
}

/* Add back the "Press Enter to view" tag but change text */
/* .tx-result.selected::after {
  content: "Press Enter to view on ViewBlock";
  display: block;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: var(--ao-border-color);
  color: var(--ao-bg-color);
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 4px;
  font-weight: 500;
} */

/* Update iframe styling to match normal results */
.tx-iframe-header {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--ao-border-color);
  padding: 0.75rem 1rem;
  border-radius: 8px 8px 0 0;
}

.tx-iframe-footer {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background-color: var(--ao-border-color);
  padding: 0.75rem 1rem;
  border-radius: 0 0 8px 8px;
}

/* Responsive adjustments for iframe */
@media (max-width: 768px) {
  .tx-iframe-container {
    padding: 1rem;
    overflow-y: auto;
  }
  
  .tx-iframe-content {
    height: 60vh;
  }
}

@media (max-height: 600px) {
  .tx-iframe-content {
    height: 50vh;
  }
}

/* Custom scrollbar for transaction data */
.tx-iframe-content::-webkit-scrollbar,
.tx-iframe-fallback::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.tx-iframe-content::-webkit-scrollbar-track,
.tx-iframe-fallback::-webkit-scrollbar-track {
  background: var(--ao-bg-color);
}

.tx-iframe-content::-webkit-scrollbar-thumb,
.tx-iframe-fallback::-webkit-scrollbar-thumb {
  background: var(--ao-border-color);
  border-radius: 4px;
}

.tx-iframe-content::-webkit-scrollbar-thumb:hover,
.tx-iframe-fallback::-webkit-scrollbar-thumb:hover {
  background: var(--ao-border-color);
}

/* Clickable terms in definitions */
.clickable-term {
  color: var(--ao-link-color);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.clickable-term:hover {
  opacity: 0.8;
  text-decoration-style: solid;
}
  